using System;
using System.Diagnostics;

namespace ServiceRanking
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{			
			StopWordsHandler stopword=new StopWordsHandler() ;
			string[] doc=new string[] {
                "test tretr",
										   "test b c c dd d d d d",
										   "a b c c c d dd d d test"
										,   "c d b f y teyr etre tretr gfgd c",
										"r a e e f n l i f f f f x l"
			};

			TFIDFMeasure tf=new TFIDFMeasure() ;
            tf.LoadDocs(doc);
            //Trace.WriteLine((double)Math.Log(10000/50) ) ;
			Trace.WriteLine(tf.GetSimilarity(0,3) ) ;
			string[] _3grams=NGram.GenerateNGrams("TEXT", 3) ;

            for (int i = 0; i < doc.Length; i++) {
                string vector = "doc_" + i + ":";
                float[] v = tf.GetTermVector(i);
                string[] vs=new string[v.Length];
                for (int j = 0; j < v.Length; j++)
                    vs[j] = v[j].ToString();
                    vector += String.Join(",", vs, 0, v.Length);
                Trace.WriteLine(vector);
            }

			//
			// TODO: Add code to start application here
			//
		}
	}
}
